using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class FitTextContent : MonoBehaviour
{
    private Button button; 
    private Text text;
    
    private void Start()
    {
        button = GetComponent<Button>();
        text = GetComponentInChildren<Text>();

        button.GetComponent<ContentSizeFitter>().SetLayoutHorizontal();
        button.GetComponent<ContentSizeFitter>().SetLayoutVertical();
    }
    
    // Update is called once per frame
    void Update()
    {
        
    }
}
